{template 'admin','header'}
    <form action="admin/category.php?action=listorder&site_id={$siteid}" name="form1"  method="POST" onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>栏目管理</caption>
        <tr>
            <th width="80" class="align_c"><input type="checkbox" onclick="checkall(this,'cid')" id="chkall">全选/取消</th>
            <th width="5%">排序</th>
            <th>栏目名称</th>
            <th>栏目模型</th>
            <th width="320">管理操作</th>
        </tr>
        {loop $category_list $category}
        <tr>
            <td class="align_c">
                <input id="cid" name="cid[]" type="checkbox" id="checkbox"  value="{$category['catid']}"/>
            </td>
            <td class="align_c">
                <input type="text" name="listorder[{$category['catid']}]" size="2" value="{$category['listorder']}"/>
            </td>
            <td class="align_c">{$category['catname']}</td>
            <td class="align_c">{$model_list[$category['modelid']]}</td>
            <td class="align_c">
                {if check_perms('C002')===true}<a href="{$self_dir}/category.php?action=add&site_id={$siteid}&catid={$category['catid']}&forward={$forward}">添加子栏目</a>&nbsp;|&nbsp;{/if}
                {if check_perms('C006')===true}<a href="{$self_dir}/category.php?action=child&site_id={$siteid}&catid={$category['catid']}&forward={$forward}">子栏目</a>&nbsp;|&nbsp;{/if}
                {if check_perms('C003')===true}<a href="{$self_dir}/category.php?action=upd&site_id={$siteid}&catid={$category['catid']}&forward={$forward}">修改</a>&nbsp;|&nbsp;{/if}
                {if check_perms('C004')===true}<a href="javascript:my_request('{format_url("$self_dir/category.php?action=del&site_id=$siteid&catid=".$category['catid'])}','确认要删除吗？')">删除</a>{/if}
            </td>
        </tr>
        {/loop}
    </table>
    <div class="button_box">
        {if check_perms('C005')===true}<input class="button_style" name="order" type="button" value=" 排序 " onclick="change_opt('form1','{$self_dir}/category.php?action=listorder')"/>{/if}
        {if check_perms('C002')===true}<input class="button_style" name="add" type="button" value=" 添加栏目 " onclick="self.location='{$self_url}?action=add&site_id={$siteid}&forward={$forward}'"/>
        <input class="button_style" name="add" type="button" value=" 批量添加栏目 " onclick="self.location='{$self_url}?action=add_list&site_id={$siteid}&forward={$forward}'"/>
        {/if}
        {if check_perms('C004')===true}<input class="button_style" name="del" type="button" value=" 批量删除 " onclick="if(confirm('确定要删除选中的组？')){change_opt('form1','{$self_dir}/category.php?action=del_all&site_id={$siteid}');}"/>{/if}
    </div>
    </form>
    <div id="pages">
        {$category_pages}
    </div>
{template 'admin','footer'}
